<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
<meta content="telephone=no" name="format-detection"/>
<script src="/js/jquery-1.11.3.js"></script>
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/swiper.min.css">
<link rel="stylesheet" href="/css/ionicons.min.css">
<title>淘惠品--免费试用</title>
</head>

<body>
<header>
	免费试用
	<div class="home"><a href="/"></a></div>
	<div class="search"><a href=""></a></div>
	<div class="clear"></div>
	
</header>

<!--推荐-Start-->
<div class="hot" style="margin-top:60px;">
	<div class="index_title">
		<span></span>精品推荐
	</div>
	<div class="hot_slider">
	    <ul class="swiper-wrapper" id="lun_tu">
			<p class="icon ion-load-a loading"></p>
		</ul>
		
		
	</div>
</div>
<!--推荐-End-->
	
<!--试用列表-Start-->
<div class="trial_list" id='goods_lists' >
	<p class="icon ion-load-a loading"></p>
</div>


<!--试用列表-End-->
<div class="tk"></div>
<script src="/js/footer.js"></script>
<script src="/js/swiper.min.js"></script>
<script src="/js/common.js"></script>
<script src="/js/inx.js"></script>
<script>

var goods_list='';
$(function(){  
$.ajax(  
    {   data:{page:1,num:8,mod:'trial',orderby:'start_time',orderway:'desc'},
        type:'get',  
        url : ''+myconfig['url']+'/index.php?m=api&c=app&a=goodslists',  
        dataType : 'json',  
        jsonp:"jsoncallback",  
        success  : function(data) {  
            for(var i=0;i<data.lists.length;i++){
				var protype 
			if(data.lists[i].protype == 1){
				protype = '普通试用'
				}
			else if(data.lists[i].protype == 2){
				protype = '拍A发B'
				}
			else{
				protype = '红包试用'
				}
			   goods_list+='<li><a href="/templates/trial/show_trial.html?goods_id='+data.lists[i].id+' " >'
			   goods_list+='<div class="trial_listL"><img src='+myconfig['url']+data.lists[i].thumb+'></div>'
			   goods_list+='<div class="trial_listR">'
			   goods_list+='<div class="trial_list_title">'+data.lists[i].title+'</div>'
			   goods_list+='<div class="trial_list_price">价值：<span>￥'+data.lists[i].goods_price+'</span><b>'+protype+'</b></div>'
			   goods_list+='<div class="trial_list_num">剩余:&nbsp;<b>'+data.lists[i].number+'</b>份<i>关注人数:<b>'+data.lists[i].hits+'</b>人</i></div></div></a></li>'
			}; 
			
           	$('#goods_lists').html(goods_list); 
           			
        },  
        error : function() {  
            $("#goods_lists").html("数据加载失败！")
        }  
    }  
); 
 
})

</script>
</body>
</html>
